//
//  Encypt.h
//  ios-loan
//
//  Created by ys on 15/12/2017.
//  Copyright © 2017 hxhg. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Encypt : NSObject

+ (NSString *)getRandomAESKey;

/**
 *  AES加密
 */
+ (NSData *)AESEncrypt:(NSData *)content WithKey:(NSString *)key;

/**
 *  AES解密
 */
+ (NSData *)AESDecrypt:(NSData *)content WithKey:(NSString *)key;


@end

@interface NSString (RSA)

/**
 *  公钥RSA加密
 *
 *  @param pubKey 公钥base64加密字符串
 *
 *  @return base64加密字符串
 */
- (NSString *)RSAEncryptWithPublicKey:(NSString *)pubKey;

@end

